<?php
class Task extends AppModel{
	public $name='Task';
	 
	public $validate = array(		
		'name' => array(array('rule'=>'notEmpty','message'=>'Can not be empty!'))
		);
		
		public $belongsTo = array(
		 'Status' => array(
		 'className' => 'Status',
		 'foreignKey' => 'status_id'
		 ),
		 
		 'Priority' => array(
		 'className' => 'Priority',
		 'foreignKey' => 'priority_id'
		 ),
		 
		 'Type' => array(
		 'className' => 'Type',
		 'foreignKey' => 'type_id'
		 ),
		 
		 'Project' => array(
		 'className' => 'Project',
		 'foreignKey' => 'project_id'
		 ),
		 
		 'Assignee' => array(
		 'className' => 'User',
		 'foreignKey' => 'assignees'
		 )
		 );
	/*	 
	public $hasMany = array(
        
        'FileAttach' => array(
            'className'     => 'FileAttach', 
 			'foreignKey'=>'task_id',
            'dependent'=> true
        )
    );  */
}
?>
